﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Lion.WeiXin.Core.Models;
namespace Lion.WeiXin.Core.Data
{
   public interface IWeChatUser
    {
 
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        bool Exists(int AID);
        bool Exists(string openId);
        /// <summary>
        /// 增加一条数据
        /// </summary>
        int Add(Models.WeChatUserModel model);

        void Insert(List<WeChatUserModel> localUsers, int batchSize);
        /// <summary>
        /// 更新一条数据
        /// </summary>
        bool Update(Models.WeChatUserModel model);
        /// <summary>
        /// 删除一条数据
        /// </summary>
        bool Delete(int AID);
        bool DeleteUser(string openId);
        bool DeleteList(string AIDlist);
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        Models.WeChatUserModel GetModel(int AID);
        Models.WeChatUserModel GetModel(string openId);
        /// <summary>
        /// 获得数据列表
        /// </summary>
        List<Models.WeChatUserModel> GetList(string strWhere);
        /// <summary>
        /// 获得前几行数据
        /// </summary>
        List<Models.WeChatUserModel> GetList(int Top, string strWhere, string filedOrder);
        int GetRecordCount(string strWhere);
        List<Models.WeChatUserModel> GetListByPage(string strWhere, string orderby, int startIndex, int endIndex);
        /// <summary>
        /// 根据分页获得数据列表
        /// </summary>
        //DataSet GetList(int PageSize,int PageIndex,string strWhere);

    }
}
